<div id="setting">
	<?php foreach($script_names as $script_name): ?>
	<div to="<?php echo $script_name ?>"><?php echo $script_name ?></div>
	<?php endforeach; ?>
</div>
<script type="text/javascript">
$('#setting div').click(function(){
	$this = $(this);
	url = site.url + 'setting/scripts/' + $this.attr('to');
	$.get(url, function(data){
		console.log(data);
	}, 'json');
});
</script>